package com.ygqh.baby.mapper;

import com.ygqh.baby.ao.QueryInfo;
import com.ygqh.baby.model.BmdismLadderModel;
import com.ygqh.baby.po.YgBmdism;
import com.ygqh.baby.po.YgBmdismExample;
import com.ygqh.baby.po.YgProduct;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface YgBmdismMapper {
    int countByExample(YgBmdismExample example);

    int deleteByExample(YgBmdismExample example);

    int deleteByPrimaryKey(Long id);

    int insert(YgBmdism record);

    int insertSelective(YgBmdism record);

    List<YgBmdism> selectByExample(YgBmdismExample example);

    YgBmdism selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") YgBmdism record, @Param("example") YgBmdismExample example);

    int updateByExample(@Param("record") YgBmdism record, @Param("example") YgBmdismExample example);

    int updateByPrimaryKeySelective(YgBmdism record);

    int updateByPrimaryKey(YgBmdism record);

    int countSuper(@Param("title") String title, @Param("startDate") Date startDate, @Param("endDate") Date endDate, @Param("status") String status,
                   @Param("q") String q);

    List<YgBmdism> selectSuper(@Param("queryInfo") QueryInfo queryInfo, @Param("title") String title, @Param("startDate") Date startDate,
                               @Param("endDate") Date endDate, @Param("status") String status, @Param("q") String q);

    /**
     * TODO sql 未实现
     *
     * @param queryInfo   分页
     * @param bmdismId    多买多折id
     * @param productName 商品名称
     * @return List<YgProduct>
     */
    List<YgProduct> selectProductByBmdism(@Param("queryInfo") QueryInfo queryInfo, @Param("bmdismId") Long bmdismId, @Param("productName") String productName);

}
